<?php
	$loi = "";
	if(isset($_POST["ok"])){
		$l = "";
		if($_POST["loai"] == null){
			$loi[] = "Chua nhap loai";
		}else{
			$l = $_POST["loai"];
		}
		if($l){
			$add = new mloai();
			$add->setloai($l);
			$add->add();
			header("location: index.php?module=loai&action=list");
			exit();
		}
	}
	require ("views/loaixe/vadd_loai.php");
?>